<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
	content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
<meta name="author" content="Muhammad Usman">

<!-- The styles -->
<link
	href="<%=request.getContextPath()%>/resources/css/bootstrap-cerulean.min.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/resources/css/charisma-app.css"
	rel="stylesheet">
<link
	href='<%=request.getContextPath()%>/resources/bower_components/fullcalendar/dist/fullcalendar.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/fullcalendar/dist/fullcalendar.print.css'
	rel='stylesheet' media='print'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/chosen/chosen.min.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/colorbox/example3/colorbox.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/responsive-tables/responsive-tables.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css'
	rel='stylesheet'>
<link href='<%=request.getContextPath()%>/resources/css/jquery.noty.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/noty_theme_default.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/elfinder.min.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/elfinder.theme.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/jquery.iphone.toggle.css'
	rel='stylesheet'>
<link href='<%=request.getContextPath()%>/resources/css/uploadify.css'
	rel='stylesheet'>
<link href='<%=request.getContextPath()%>/resources/css/animate.min.css'
	rel='stylesheet'>
<!-- jQuery -->
<link href='<%=request.getContextPath()%>/resources/MyCss/main.css'
	rel='stylesheet'>
<script
	src="<%=request.getContextPath()%>/resources/bower_components/jquery/jquery.min.js"></script>
<script
	src="<%=request.getContextPath()%>/resources/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
<!-- The fav icon -->
<link rel="shortcut icon" href="img/favicon.ico">
<script type="text/javascript">
	function changeRole(role, message) {
		$(".login-form").css("display", "none");
		$("." + role).css("display", "block");
		$(".login-message").html(message);
	}
	function studentRegister(url) {
		$.get(url, {}, function(data) {
			$("#student-register-form").html(data);
			$("#studentRegisterModal").modal("show");
		});
	}
</script>
</head>

<body>
	<div class="ch-container">
		<div class="row">
			<div class="row">
				<div class="col-md-12 center login-header">
					<h2 class="login-message">欢迎登入</h2>
				</div>
			</div>
			<div class="row">
				<div class="well col-md-5 center login-box">
					<div class="alert alert-info text-left">
						<a
							href="javascript:studentRegister('<%=request.getContextPath()%>/studentRegister')">考生注册</a>
					<span style="font-size: 16px; color: green;">${message }</span>
					</div>
					<form class="form-horizontal login-form"
						action="<%=request.getContextPath()%>/login" method="post">
						<fieldset>
							<div class="input-group input-group-lg">
								<span class="input-group-addon"><i
									class="glyphicon glyphicon-user red"></i></span> <input
									name="username" type="text" class="form-control"
									placeholder="账号" />
							</div>
							<div class="clearfix"></div>
							<br>
							<div class="input-group input-group-lg">
								<span class="input-group-addon"><i
									class="glyphicon glyphicon-lock red"></i></span> <input
									type="password" class="form-control" placeholder="密码"
									name="password" />
							</div>
							<div class="clearfix"></div>
							<div class="input-prepend">
							<div class="clearfix"></div>
							<p class="center col-md-5">
								<button type="submit" class="btn btn-primary">登入</button>
							</p>
						</fieldset>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div class="modal fade" id="studentRegisterModal" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<form class="form-horizontal" id="student-register-submit"
					role="form">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">考生注册</h4>
					</div>
					<div class="modal-body">
						<p>
							<input type="text" name="name" class="form-control"
								placeholder="姓名*" />
						</p>
						<p>
							<input type="text" name="username" class="form-control"
								placeholder="身份证*" />
						</p>
						<p>
							<input type="password" name="password" class="form-control"
								placeholder="密码*" />
						</p>
						<p>
							<input type="password" name="conPassword" class="form-control"
								placeholder="密码确认*" />
						</p>
						<p>
							<input type="text" name="birthday" class="form-control datetime"
								placeholder="生日*" />
						</p>
						<div class="radio radio-pos">
							<label> <input type="radio" name="sex"
								id="optionsRadios1" value="男" checked> 男
							</label>
						</div>
						<div class="radio radio-pos">
							<label> <input type="radio" name="sex"
								id="optionsRadios2" value="女">女
							</label>
						</div>
						<p>
							<input type="text" name="address" class="form-control"
								placeholder="住址*" />
						</p>
						<div id="student-register-form"></div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">关闭</button>
							<button type="button" class="btn btn-primary"
								onclick="javascript:studentRegisterSubmit('<%=request.getContextPath()%>/student/studentRegister')">注册信息</button>
						</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>
